<?php
$str = "This is Hello @World in Php!";
while (preg_match("/@[A-Z 0-9a-z!]/", $str, $matches)) {
  //print_r($matches);
  $search =  $matches[0];
  $str = str_replace($search,'*',$str);

}
echo $str , "\n\n";
